<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="客户图样记录" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script language="javascript">
	function doDownload(id,fileName,sourceName){
		var xmlHttp=createXMLHttpRequest();
		xmlHttp.open("GET", "/FileDownloadLog.ihtm?id="+id);
		xmlHttp.onreadystatechange = function(){
			doDownloadCallback(xmlHttp,fileName,sourceName);
		};
		xmlHttp.send(null);
	}
	function doDownloadCallback(xmlHttp,fileName,sourceName){
    	if (xmlHttp.readyState == 4) {
      		if (xmlHttp.status == 200) {
      			var resTxt=xmlHttp.responseText;
      			if(resTxt=="NO_LOGIN"){
      				ShowAlert('提示框','你还没登录或已经超时，请重新登录。',200,100);
      			}else if(resTxt=="OK"){
      				window.location="/FileDownload.ihtm?file_name="+encodeURIComponent(fileName)+"&source_name="+encodeURIComponent(sourceName);
      			}
			}
		}
	}
	function doJump(pageIndex){
		if(window.event.keyCode==13){
			doGo(pageIndex);
		}
	}
	function doGo(pageIndex){
		window.location="/business/AccessoryListForClient.ihtm?id=${id}&current_page="+pageIndex;
	}
</script>
</head>
<body oncontextmenu="return false" class="sheet" style="text-align:center;">
<div class="sheet-main" style="width:860px;text-align:left;margin:auto;">
	<div class="sheet-top">
		<div class="content">
		  <h2>客户图样记录</h2>
		  <p>客户名称：${est.estName}</p>
		</div>
	</div>
	  <div class="sheet-list">
			  <div class="table-list">
			     <table width="100%" align="center">      
					 <tr>			   		
						<th width="14%">业务单号</th>
						<th width="22%">文件</th>
						<th width="24%">资料路径</th>
						<th width="14%">文件说明</th>
						<th width="10%">上传人</th>
						<th width="10%">上传时间</th>
						<th width="6%">操作</th>
					</tr>
					<c:forEach var="item" items="${qr.list}">
					<tr>
						<td >${item[1].billCode}</td>
						<td >
							<c:if test="${item[0].fileName!=null && item[0].fileName!=''}"><a href="${item[0].fileName}" target="_blank">${item[0].sourceName}</a></c:if>
							<c:if test="${item[0].fileName==null || item[0].fileName==''}">${item[0].sourceName}</c:if>
						</td>
						<td >${item[0].customPath}</td>
						<td >${item[0].mark}</td>
						<td >${item[0].createrName}</td>
						<td ><fmt:formatDate value="${item[0].createTime}" pattern="yyyy-MM-dd"/></td>
						<td >
							<c:if test="${item[0].fileName!=null && item[0].fileName!=''}"><a href="javascript:doDownload('${item[0].id}','${item[0].fileName}','${item[0].sourceName}');">下载</a></c:if>
						</td>
					</tr>
					</c:forEach>
				</table>
				<%@include file="../inc/Pages.jsp"%>
			  </div>
			</div>
</div>
</body>
</html>